package warmachineroster.presentation.command;

import org.eclipse.gef.commands.Command;

import warmachineroster.Roster;
import warmachineroster.RosterElement;

public class RosterElementRemoveCommand extends Command {

	private RosterElement rosterElement;
	private Roster roster;

	public void setRoster(Roster roster) {
		this.roster = roster;
	}

	public void setRosterElement(RosterElement baseUnit) {
		this.rosterElement = baseUnit;
	}

	@Override
	public void execute() {
		roster.getRosterUnits().remove(rosterElement);
	}

	@Override
	public void undo() {
		roster.getRosterUnits().add(rosterElement);
	}
	
}
